package com.example.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;

//设置表头和添加的数据字段
@Data
@HeadRowHeight(value = 35) // 表头行高
@ContentRowHeight(value = 25) // 内容行高
public class DemoData{

    @ExcelProperty(value = "学生编号",index = 0)
    @ColumnWidth(value = 60)
    private Integer sno;

    //设置表头名称
    @ExcelProperty(value = "学生姓名",index = 1)
    @ColumnWidth(value = 60)
    private String sname;
}

